using System;
using System.Collections.Generic;
using System.Text;
using GameFramework;
using GameEngine;

namespace Projet_X0
{
    public class GameScreen : GameEntity
    {
        private Player player = null;
        private Camera camera = null;
        
        public GameScreen()
        {
        }

        public override void Init()
        {
            entities.Add(new Terrain());
            player = new Player(new Vector2D(800, 600), 0f, (int)EntityID.Player, 100f, new Weapons());
            
            entities.Add(player);
            entities.Add(new Ennemy(new Vector2D(600, 500), 0f, (int)EntityID.Ennemy1, player, 50f, new Weapons()));
            entities.Add(new Ennemy(new Vector2D(1000, 900), 0f, (int)EntityID.Ennemy2, player, 60f, null));
                        
            camera = new Camera(player);
            entities.Add(camera);
            entities.Add(new InterfaceEntity(player));
        }

        public override void Update()
        {
            if (CoreServices.GetServices().input.IsKeyPressed(Keys.Escape))
                Terminate();
                                       
        }
    }
}
